package com.nt.train.service.impl;
import com.nt.train.dao.StudentDao;
import com.nt.train.entity.StudentPO;
import com.nt.train.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * @author hlf
 * @version 1.0
 * @date 2022/8/4 8:04
 */
@Service
public class StudentServiceImpl implements StudentService {

    @Autowired
    StudentDao studentDao;

    @Override
    public StudentPO getByPrimaryKey(Integer id) {
        return studentDao.getByPrimaryKey(id);
    }

    @Override
    public void addStudent(StudentPO student) {
        studentDao.addStudent(student);
    }

    @Override
    public void delStudentById(Long id) {
        studentDao.delStudentById(id);
    }

    @Override
    public void updateStudent(StudentPO student) {
        studentDao.updateStudent(student);
    }

    @Override
    public List<StudentPO> selectStudent() {
        return studentDao.selectStudent();
    }
}